using UnityEngine;

public class TagyOn : MonoBehaviour
{
    [SerializeField] private GameObject TagyObj;
    [SerializeField] private ActiveObject spawnObject;

    private ActionDistance action;


    private void Start()
    {
        action = GetComponent<ActionDistance>();
    }
    private void OnMouseDown()
    {
        if(action.s && PlayerData.ParentObject.transform.childCount==0)
            TagyObj.SetActive(true);
        Debug.Log(PlayerPrefs.GetInt("Win"));

    }

    public void SpawnObject()
    {
        spawnObject.IsActive();
    }
}
